|
NcApi
|

Macros | |
| #define | NCAPI_HOST_PREFIX_SIZE 2 |
| #define | NCAPI_HOSTACK_LENGTH 2 |
| #define | NCAPI_HOSTDATA_HEADER_SIZE 5 |
| #define | NCAPI_HOSTDATA_MIN_LENGTH (NCAPI_HOSTDATA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE) |
| #define | NCAPI_HOSTDATAHAPA_HEADER_SIZE 7 |
| #define | NCAPI_HOSTDATAHAPA_MIN_LENGTH (NCAPI_HOSTDATAHAPA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE) |
| #define | NCAPI_WESREQUEST_LENGTH 6 |
| #define | NCAPI_WESRESPONSE_LENGTH 7 |
| #define | NCAPI_WESCMD_LENGTH 1 |
| #define | NCAPI_WESSTATUS_LENGTH 1 |
| #define | NCAPI_NODEINFOREPLY_LENGTH 8 |
Typedefs | |
| typedef enum NcApiMessageType | NcApiMessageType |
Enumerations | |
| enum | NcApiMessageType { CommandAcknowledgedEnum = 0x03, WesCmdEnum = 0x10, WesRequestEnum = 0x61, WesResponseEnum = 0x11, WesStatusEnum = 0x60, HostAckEnum = 0x50, HostNAckEnum = 0x51, HostDataEnum = 0x52, HostDataHapaEnum = 0x53, NodeInfoReplyEnum = 0x58 } |
Functions | |
| int | NcApiIsValidApiFrame (uint8_t *buffer, uint16_t position, uint16_t *outStartAt, uint16_t *outLength) |
| Determines if the content in the buffer is a valid Api-message. More... | |
| int | NcApiIsValidSysFrame (uint8_t *buffer, uint16_t position, uint16_t *outStartAt, uint16_t *outLength) |
| Determines if the content in the buffer is a valid System-trace-message or a Bootloader-message. More... | |
| int | NcApiIsMsgNodeIdUid (uint8_t *buffer, uint16_t startAt, uint16_t length) |
| Determines whether the message in the buffer contains NodeId and Uid. More... | |
| void | NcApiGetMsgAsHostAck (uint8_t *buffer, tNcApiHostAck *p) |
| Deserializes the content of the bufer into a tNcApiHostAck instance. More... | |
| void | NcApiGetMsgAsHostData (uint8_t *buffer, tNcApiHostData *p) |
| Deserializes the content of the bufer into a tNcApiHostData instance. More... | |
| void | NcApiGetMsgAsHostDataHapa (uint8_t *buffer, tNcApiHostDataHapa *p) |
| Deserializes the content of the bufer into a tNcApiHostDataHapa instance. More... | |
| void | NcApiGetMsgAsWesStatus (uint8_t *buffer, tNcApiWesStatus *p) |
| Deserializes the content of the bufer into a tNcApiWesStatus instance. More... | |
| void | NcApiGetMsgAsWesRequest (uint8_t *buffer, tNcApiWesRequest *p) |
| Deserializes the content of the bufer into a tNcApiWesRequest instance. More... | |
| #define NCAPI_HOST_PREFIX_SIZE 2 |
| #define NCAPI_HOSTACK_LENGTH 2 |
| #define NCAPI_HOSTDATA_HEADER_SIZE 5 |
| #define NCAPI_HOSTDATA_MIN_LENGTH (NCAPI_HOSTDATA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE) |
| #define NCAPI_HOSTDATAHAPA_HEADER_SIZE 7 |
| #define NCAPI_HOSTDATAHAPA_MIN_LENGTH (NCAPI_HOSTDATAHAPA_HEADER_SIZE+NCAPI_HOST_PREFIX_SIZE) |
| #define NCAPI_NODEINFOREPLY_LENGTH 8 |
| #define NCAPI_WESCMD_LENGTH 1 |
| #define NCAPI_WESREQUEST_LENGTH 6 |
| #define NCAPI_WESRESPONSE_LENGTH 7 |
| #define NCAPI_WESSTATUS_LENGTH 1 |
| typedef enum NcApiMessageType NcApiMessageType |
| enum NcApiMessageType |
| void NcApiGetMsgAsHostAck | ( | uint8_t * | buffer, |
| tNcApiHostAck * | p | ||
| ) |
Deserializes the content of the bufer into a tNcApiHostAck instance.
| buffer | Buffer containing message |
| p | Instance to deserialize into |
| void NcApiGetMsgAsHostData | ( | uint8_t * | buffer, |
| tNcApiHostData * | p | ||
| ) |
Deserializes the content of the bufer into a tNcApiHostData instance.
| buffer | Buffer containing message |
| p | Instance to deserialize into |
| void NcApiGetMsgAsHostDataHapa | ( | uint8_t * | buffer, |
| tNcApiHostDataHapa * | p | ||
| ) |
Deserializes the content of the bufer into a tNcApiHostDataHapa instance.
| buffer | Buffer containing message |
| p | Instance to deserialize into |
| void NcApiGetMsgAsWesRequest | ( | uint8_t * | buffer, |
| tNcApiWesRequest * | p | ||
| ) |
Deserializes the content of the bufer into a tNcApiWesRequest instance.
| buffer | Buffer containing message |
| p | Instance to deserialize into |
| void NcApiGetMsgAsWesStatus | ( | uint8_t * | buffer, |
| tNcApiWesStatus * | p | ||
| ) |
Deserializes the content of the bufer into a tNcApiWesStatus instance.
| buffer | Buffer containing message |
| p | Instance to deserialize into |
| int NcApiIsMsgNodeIdUid | ( | uint8_t * | buffer, |
| uint16_t | startAt, | ||
| uint16_t | length | ||
| ) |
Determines whether the message in the buffer contains NodeId and Uid.
| buffer | Buffer containing message |
| startAt | Index of message start in buffer |
| length | Message length |
| int NcApiIsValidApiFrame | ( | uint8_t * | buffer, |
| uint16_t | position, | ||
| uint16_t * | outStartAt, | ||
| uint16_t * | outLength | ||
| ) |
Determines if the content in the buffer is a valid Api-message.
| buffer | Received RX-data | |
| position | Number of received bytes | |
| [out] | outStartAt | If a message was found, index into buffer where the message begins |
| [out] | outLength | If a message was found, the message length |
| int NcApiIsValidSysFrame | ( | uint8_t * | buffer, |
| uint16_t | position, | ||
| uint16_t * | outStartAt, | ||
| uint16_t * | outLength | ||
| ) |
Determines if the content in the buffer is a valid System-trace-message or a Bootloader-message.
| buffer | Received RX-data | |
| position | Number of received bytes | |
| [out] | outStartAt | If a message was found, index into buffer where the message begins |
| [out] | outLength | If a message was found, the message length |
1.8.10